.TH OCAMLBURGFIX 1 "$ Date: $"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.hy 0
.if n .na
.\"
.SH NAME
ocamlburgfix \- improve output of ocamlburg(1)
.SH SYNOPSIS
\fBocamlburgfix\fP \fIfile\fP
.br
\fBocamlburg\fP \fBfoo.mlb\fP | \fBocamlburgfix\fP \fBfoo.ml\fP 
.SH DESCRIPTION
\fBocamlburgfix\fP reads input from stdin, annotates cpp(1) line
directives, and writes the output to \fIfile\fP.  When the final output is
compiled with ocamlc(1), the annotations lead to more precise error
messages than without.
.PP
The output of ocamlburg(1) contains line directives that point back to
the source of certain lines in the output:
.nf
  105  # 19 "foo.mlb"
  106                                  ( x + y + z)
  107                                  
  108  # 000 "/dev/stdout"
  109  )
  110                  }
.fi
The lines 106-107 stem from line 19-20 in file foo.mlb. In case of an
error in these lines the ocamlc(1) compiler, who understands the line
directives, can point to the right file. What \fBocamlburgfix\fP does, is to
replace the lines containing /dev/stdout with references to foo.ml, the
actual output file:
.nf
  105  # 19 "foo.mlb"
  106                                  ( x + y + z)
  107                                  
  108  # 109 "foo.ml"
  109  )
  110                  }
.fi
This helps the compiler to point to the right file in case an error is
found in the code generated by ocamlburg(1) that is not copied verbatim
from foo.mlb.
.SH AUTHOR
Christian Lindig <lindig@eecs.harard.edu>
.SH SEE ALSO
ocamlburg(1), ocamlc(1), cpp(1)
http://www.cminusminus.org/tools.html





